package org.lds.scheduled.job.admin.business.job.service;

import org.lds.scheduled.job.admin.business.job.entity.Job;
import org.lds.scheduled.job.admin.business.job.model.request.*;
import org.lds.scheduled.job.admin.business.job.model.response.*;
import org.lds.scheduled.job.common.model.dto.ResultDTO;
import org.lds.scheduled.job.common.model.db.OrderBy;
import org.lds.scheduled.job.common.model.db.PageResult;


/**
 * 基础服务类
 *
 * @author lidongsheng
 * @since 2025-01-16
 */
public interface JobBaseService {
    /**
     * 创建
     */
    ResultDTO<JobBaseResponse> createJob(JobBaseCreateRequest request);

    /**
     * 批量创建
     */
    ResultDTO<JobBaseBatchCreateResponse> batchCreateJob(JobBaseBatchCreateRequest request);

    /**
     * 删除
     */
    ResultDTO<JobBaseDeleteResponse> deleteJob(JobBaseDeleteRequest request);

    /**
     * 批量删除
     */
    ResultDTO<JobBaseBatchDeleteResponse> batchDeleteJob(JobBaseBatchDeleteRequest request);

    /**
     * 更新
     */
    ResultDTO<JobBaseResponse> updateJob(JobBaseUpdateRequest request);

    /**
     * 批量更新
     */
    ResultDTO<JobBaseBatchUpdateResponse> batchUpdateJob(JobBaseBatchUpdateRequest request);

    /**
     * 根据ID查询
     */
    ResultDTO<JobBaseResponse> getJobById(JobBaseGetByIdRequest request);

    /**
     * 根据ID集合查询
     */
    ResultDTO<JobBaseListResponse> getJobByIds(JobBaseGetByIdsRequest request);

    /**
     * 根据业务主键查询
     */
    Job getJobByKey(JobBaseGetByKeyRequest request);

    /**
     * 查询
     */
    ResultDTO<JobBaseListResponse> listJob(JobBaseListRequest request);

    /**
     * 查询所有
     */
    ResultDTO<JobBaseListResponse> listAllJob(OrderBy orderBy);

    /**
     * 分页查询
     */
    ResultDTO<PageResult<JobBaseResponse>> listJobPage(JobBaseListPageRequest request);


    /***************************** 异步尝鲜 谨慎使用[性能提升10倍以上] start ******************************/

    /**
     * 异步批量创建
     */
    ResultDTO<JobBaseBatchCreateResponse> batchCreateJobAsync(JobBaseBatchCreateRequest request);

    /**
     * 异步批量删除
     */
    ResultDTO<JobBaseBatchDeleteResponse> batchDeleteJobAsync(JobBaseBatchDeleteRequest request);

    /**
     * 异步批量更新
     */
    ResultDTO<JobBaseBatchUpdateResponse> batchUpdateJobAsync(JobBaseBatchUpdateRequest request);

    /***************************** 异步尝鲜 谨慎使用[性能提升10倍以上] end ******************************/
}